package com.lineage.data.item_weapon;

import com.lineage.data.executor.ItemExecutor;
import com.lineage.server.model.Instance.L1ItemInstance;
import com.lineage.server.model.Instance.L1PcInstance;
import com.lineage.server.model.L1Character;
import com.lineage.server.model.L1PolyMorph;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

public class death_knight extends ItemExecutor {
  private static final Log _log = LogFactory.getLog(death_knight.class);
  
  public static ItemExecutor get() {
    return new death_knight();
  }
  
  public void execute(int[] data, L1PcInstance pc, L1ItemInstance item) {
    try {
      switch (data[0]) {
        case 0:
          L1PolyMorph.undoPoly((L1Character)pc);
          break;
        case 1:
          L1PolyMorph.doPoly((L1Character)pc, 12232, 0, 1);
          break;
      } 
    } catch (Exception e) {
      _log.error(e.getLocalizedMessage(), e);
    } 
  }
}
